feat(cli): add installable mode-toggle component#230
Conversation
Promote the docs site theme switcher to a first-class registry entry so `solidui-cli add mode-toggle` pulls button and dropdown-menu deps and installs light/dark/system switching without copy-paste from examples. Uses lucide-solid icons (already credited in NOTICE). Update dark-mode docs to reference the single add command. Maintainers: run `pnpm build:registry` in apps/docs before release. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@AMDphreak is attempting to deploy a commit to the Stefan EK's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Summary
The docs site already ships a light/dark/system theme dropdown (
ModeToggle) used in the navbar and dark-mode guides, but it only existed as an example registry entry. The CLI filtersaddtotype: ui, so users could not install it and kept copy-pasting from the docs.This PR:
registry/ui/mode-toggle.tsx(same UX as the docs navbar;lucide-solidicons)mode-toggleinregistry-ui.tswithregistryDependencies: [button, dropdown-menu]components/mode-toggleandexample/mode-toggleto re-export the UI componentnpx solidui-cli@latest add mode-toggleMaintainer checklist
pnpm build:registryinapps/docsand deploy registry JSON to solid-ui.comTest plan
pnpm build:registryin apps/docssolidui-cli init,solidui-cli add mode-toggle, wireColorModeProviderper docs